﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AssetStudioGUI
{
    internal class FileLog
    {
        private static readonly string logPath = "app.log";
        public static void Log(string message)
        {
            try
            {
                using (StreamWriter writer = new StreamWriter(logPath, true))
                {
                    string logEntry = $"{DateTime.Now::yyyy-MM-dd HH:mm:ss} - {message}";
                    writer.WriteLine(logEntry);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
    }
}
